﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ACM_POPUP.aspx.cs" Inherits="KPIS.GERP.GAMS.APP.App_UI.Forms.ACM_POPUP" %>

<html>
<head> 
    <title>รหัสบัญชี</title>
    <link href="../CssClass.css" rel="stylesheet" type="text/css" />

</head>
<body>
<form id="form1" runat="server">
<telerik:RadScriptManager ID ="RadScriptManager1" runat="server"></telerik:RadScriptManager>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="Panel1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="Panel1" 
                        LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" BackgroundPosition="None" Skin="Outlook">
</telerik:RadAjaxLoadingPanel>
  <script type="text/javascript">
            function GetRadWindow()
            {
                var oWindow = null;
                if (window.radWindow) oWindow = window.radWindow;
                else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
                return oWindow;
            }
            function returnToParent(sender, args)
            {
                var oArg = new Object();
                var oWnd = GetRadWindow();
                var node = args.get_node();
                var nodes = node.get_nodes();
                var lblControlName = document.getElementById('lblControlName');
                
                if (nodes.get_count() == 0)
                {
                    oArg.account_seq = node.get_value();
                    oArg.ControlName = lblControlName.value;
                    oWnd.close(oArg);
                }
                else
                {
                    node.toggle();
                }
            }
      </script>
    <div>
        <table align = "center">
            <tr>
                <td valign="top">
                   <div class="moduleContent590">
                   <div class="moduleDivBottom590">
                      <asp:Panel ID="Panel1" runat="server" CssClass="contentPaneDiv" Height="500px" ScrollBars="Auto">
                         <telerik:RadTreeView ID="RadTreeView1" Runat="server" Skin="WebBlue"
                               DataFieldID="account_seq" DataFieldParentID="upper_account_seq"
                               DataTextField="upper_account_name" DataValueField="account_seq" 
                               OnClientNodeClicking="returnToParent">
                         </telerik:RadTreeView><%--OnNodeClick="RadTreeView1_NodeClick"--%>
                      </asp:Panel>
                   </div>
                   </div>                   
                </td>
            </tr>
        </table>
        <input type="hidden" id="lblControlName" runat="server" />
    </div>
    </form>
</body>
</html>
 
         

